// pages/account/account.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    //水卡充值账户
    account_recharge_balance:'',
    //余额账户
    account_balance:'',
    //积分账户
    account_integral_point:'',
    //特殊水卡账户
    special_recharge_balance:'',
    userInfo:{}
  },

 


  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    this.getIntegralRecordList();
    this.getUserInfo();
  },

 


  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  getUserInfo() {
    var that = this;
    app.ajax({
      url: 'Partner/User/getPartnerInfo',
      data: {},
      success: function (res) {

        if (res.data.code == 200) {
          that.setData({
            userInfo:res.data.data,
            account_balance: res.data.data.account_balance,
            account_recharge_balance: res.data.data.account_recharge_balance,
            special_recharge_balance: res.data.data.special_recharge_balance
          })

        }
      },

    })
  },
  
 
  
  
  //积分账户
  getIntegralRecordList() {
    var that = this;
    app.ajax({
      url: 'Partner/Achievement/wapIntegralRecordList',
      data: {
        "page": that.data.page,
        "row": 6,
        "type": ""
      },
      success: function (res) {

        if (res.data.code == 1000) {
          that.setData({
            account_integral_point: res.data.data.account_integral,
            // loadingHidden: true
          })
        }
      }
    })
  },

  
  
})